Map

Column

Map of US and Canada

New England

Leaderboard

Column

Groundhog Leaderboard

Prognosticator Ranks by Overall Weather Prediction Accuracy

Seasonal Consistency

Column

Seasonal Consistency and Prognosticator Accuracy

Documentation

Row


Workflow and Analysis


Mapping Groundhog Day Prognosticators

Mapping Groundhog Habitat Range

Retrieving Historical Weather Data

Using latitude and longitude values provided in the original groundhog dataset, we queried NASA POWER data for each groundhog location. For each location, we collected average daily surface temperature (T2M) between 01/01/1981 and 07/01/2025. The resulting dataset was then written to a CSV file and saved in the project’s data directory. This allowed the analysis to remain reproducible while avoiding the need to re-query the nasapower database each time the script was run.

Assessing Prediction Accuracy

Each groundhog prediction falls into one of two categories:

  1. Sees shadow, predicting six more weeks of winter
  2. Does not see shadow, predicting an early spring

To evaluate prediction accuracy, we divided the seasonal temperature data into three six-week windows:

  1. Winter baseline: the six weeks preceding Groundhog Day
  2. Prediction window: the six weeks following Groundhog Day
  3. Spring baseline: the six-week period after the prediction window

For each window, we calculated the mean daily temperature. We then determined whether the observed temperature during the prediction window was more similar to winter or spring conditions by comparing its distance from the winter and spring averages. A prediction was classified as correct if the groundhog’s prediction matched the observed weather conditions.

Comparing Prognosticator Accuracy

To compare performance across prognosticators, we calculated overall accuracy as the proportion of correct predictions out of total predictions made by each groundhog. Prognosticators were then ranked by this accuracy metric. These results were displayed in an interactive leaderboard, allowing users to explore accuracy rankings alongside summarizing information about each prognosticator, including details such as location, number of years prognosticating, and links to their profiles.

Assessing Seasonal Consistency

Correcting Prognosticator Accuracy


Sources


Original Data: Tidy Tuesday

Prognosticators and Predictions: Groundhog Day Website

Weather Data API: NASA POWER

Groundhog Habitat Range: Groundhog Habitat Range

Row


Packages Highlight


nasapower

The nasapower package provides an interface for easily accessing NASA POWER (Prediction Of Worldwide Energy Resource) global climatology and meteorology data directly within R and in a tidy format. We used this package to retrieve daily average surface air temperature at 2 meters above the surface (T2M) for each prognosticator location. This particular data set has a spatial resolution of 0.5 × 0.625 degrees latitude × longitude, an hourly temporal resolution, and historical coverage dating back to January 1st, 1981. This package allowed us to link historical temperature data for each prognosticator’s geographic location, which facilitated our assessment of each Groundhog Day prediction.

reactable and reactablefmtr

The reactable package was used to render interactive tables within the R Markdown flexdashboard. It provides a suite of built-in table features, such as searching and filtering rows, nesting data with expandable rows, and customizing the display. The reactablefmtr package further extends this functionality to enable additional styling and table features, including embedded images and displaying subplots in rows. These packages were used extensively to create the Groundhog Leaderboard, allowing users to interactively explore and compare Groundhog Day prognosticators.

htmltools

The htmltools package was used to further customize the Groundhog Leaderboard beyond what was natively supported by existing R packages. By embedding custom HTML elements within table itself, we were able to control layout and behavior at a finer level. For example, htmltools was used to generate hyperlinked prognosticator names, allowing users to click directly from the leaderboard to external profile pages.


References


Citations for Used Packages:
[1] "Aden-Buie G, Sievert C, Iannone R, Allaire J, Borges B (2023).\n_flexdashboard: R Markdown Format for Flexible Dashboards_.\ndoi:10.32614/CRAN.package.flexdashboard\n<https://doi.org/10.32614/CRAN.package.flexdashboard>, R package\nversion 0.6.2, <https://CRAN.R-project.org/package=flexdashboard>."
[1] "Wickham H, Averick M, Bryan J, Chang W, McGowan LD, François R,\nGrolemund G, Hayes A, Henry L, Hester J, Kuhn M, Pedersen TL, Miller E,\nBache SM, Müller K, Ooms J, Robinson D, Seidel DP, Spinu V, Takahashi\nK, Vaughan D, Wilke C, Woo K, Yutani H (2019). \"Welcome to the\ntidyverse.\" _Journal of Open Source Software_, *4*(43), 1686.\ndoi:10.21105/joss.01686 <https://doi.org/10.21105/joss.01686>."
[1] "Sparks A (2018). \"nasapower: A NASA POWER Global Meteorology, Surface\nSolar Energy and Climatology Data Client for R.\" _The Journal of Open\nSource Software_, *3*(30), 1035. doi:10.21105/joss.01035\n<https://doi.org/10.21105/joss.01035>."
[1] "Lin G (2023). _reactable: Interactive Data Tables for R_.\ndoi:10.32614/CRAN.package.reactable\n<https://doi.org/10.32614/CRAN.package.reactable>, R package version\n0.4.4, <https://CRAN.R-project.org/package=reactable>."
[1] "Cuilla K (2022). _reactablefmtr: Streamlined Table Styling and\nFormatting for Reactable_. doi:10.32614/CRAN.package.reactablefmtr\n<https://doi.org/10.32614/CRAN.package.reactablefmtr>, R package\nversion 2.0.0, <https://CRAN.R-project.org/package=reactablefmtr>."
[1] "Cheng J, Sievert C, Schloerke B, Chang W, Xie Y, Allen J (2024).\n_htmltools: Tools for HTML_. doi:10.32614/CRAN.package.htmltools\n<https://doi.org/10.32614/CRAN.package.htmltools>, R package version\n0.5.8.1, <https://CRAN.R-project.org/package=htmltools>."
[1] "Vaidyanathan R, Xie Y, Allaire J, Cheng J, Sievert C, Russell K (2023).\n_htmlwidgets: HTML Widgets for R_.\ndoi:10.32614/CRAN.package.htmlwidgets\n<https://doi.org/10.32614/CRAN.package.htmlwidgets>, R package version\n1.6.4, <https://CRAN.R-project.org/package=htmlwidgets>."
[1] "Wickham H, Pedersen T, Seidel D (2025). _scales: Scale Functions for\nVisualization_. doi:10.32614/CRAN.package.scales\n<https://doi.org/10.32614/CRAN.package.scales>, R package version\n1.4.0, <https://CRAN.R-project.org/package=scales>."
[1] "Xie Y (2025). _knitr: A General-Purpose Package for Dynamic Report\nGeneration in R_. R package version 1.50, <https://yihui.org/knitr/>."                                                                             
[2] "Xie Y (2015). _Dynamic Documents with R and knitr_, 2nd edition.\nChapman and Hall/CRC, Boca Raton, Florida. ISBN 978-1498716963,\n<https://yihui.org/knitr/>."                                                        
[3] "Xie Y (2014). \"knitr: A Comprehensive Tool for Reproducible Research in\nR.\" In Stodden V, Leisch F, Peng RD (eds.), _Implementing Reproducible\nComputational Research_. Chapman and Hall/CRC. ISBN 978-1466561595."